.header {
  background: var(--background-color);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 2rem;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem;
}

.spin {
  animation: spin 1s linear infinite;
  color: var(--primary-color);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.error-banner {
  background: var(--error-color);
  color: white;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--text-color);
  position: relative;
  transition: transform 0.3s;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-color);
  transition: transform 0.3s;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  bottom: -6px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  transform: translateY(6px) rotate(-90deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: translateY(-6px) rotate(-90deg);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  padding: 0.5rem;
  border-radius: 6px;
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--hover-background);
}

.nav-icon {
  display: flex;
  align-items: center;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.auth-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.auth-button:active {
  transform: translateY(0);
}

.user-menu {
  position: relative;
}

.user-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  border-radius: 6px;
}

.user-button:hover {
  background: var(--hover-background);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.user-name {
  font-weight: 500;
  color: var(--text-color);
}

.dropdown-icon {
  transition: transform 0.2s;
}

.dropdown-icon.open {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--background-color);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
  margin-top: 0.5rem;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--hover-background);
}

.mobile-auth {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--background-color);
    padding: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .nav.active {
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 1rem;
  }

  .auth-buttons {
    display: none;
  }

  .mobile-auth {
    display: block;
  }

  .user-name {
    display: none;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 0;
    animation: none;
  }
} 